Task References

On this page:

map

Purpose

The map task is used to map an input to an array of values.

Potential Use Case

Suppose you have a list of data to input and you want to give each item in the list a numerical placement value. You could use the map task to accomplish this.

Properties

Input and output parameters are shown below.

Incoming Type Description
arr Array Required. The input array (objects or values) to be mapped.
map Array Required. An array of values that will be used as the map.


Outgoing Type Description
result Object The mapped result.

Example

In this example the arr variable is ["a","b","c"] and the values to map are the numerals [1,2,3,].

map

The result that returns is a list of key-value items shown as ["a": 1, "b":2, "c":3].

mapresult